/**
 * @author TristanVALCKE / https://github.com/Itee
 */

import * as Constants from './constants'

describe('Constants', (): void => {
	describe('Default Values', (): void => {
		test('', (): void => {
			expect(Constants.MOUSE.LEFT).toBe(0)
			expect(Constants.MOUSE.MIDDLE).toBe(1)
			expect(Constants.MOUSE.RIGHT).toBe(2)
			expect(Constants.MOUSE.ROTATE).toBe(Constants.MOUSE.LEFT)
			expect(Constants.MOUSE.DOLLY).toBe(Constants.MOUSE.MIDDLE)
			expect(Constants.MOUSE.PAN).toBe(Constants.MOUSE.RIGHT)

			expect(Constants.CullFaceNone).toBe(0)
			expect(Constants.CullFaceBack).toBe(1)
			expect(Constants.CullFaceFront).toBe(2)
			expect(Constants.CullFaceFrontBack).toBe(3)

			expect(Constants.BasicShadowMap).toBe(0)
			expect(Constants.PCFShadowMap).toBe(1)
			expect(Constants.PCFSoftShadowMap).toBe(2)

			expect(Constants.Side.FrontSide).toBe(0)
			expect(Constants.Side.BackSide).toBe(1)
			expect(Constants.Side.DoubleSide).toBe(2)

			expect(Constants.ShadowSide.FrontSide).toBe(0)
			expect(Constants.ShadowSide.BackSide).toBe(1)
			expect(Constants.ShadowSide.DoubleSide).toBe(2)
			expect(Constants.ShadowSide.AutoSide).toBe(3)

			expect(Constants.FlatShading).toBe(1)
			expect(Constants.SmoothShading).toBe(2)
			expect(Constants.Precision.Highp).toBe(0)
			expect(Constants.Precision.Mediump).toBe(1)
			expect(Constants.Precision.Lowp).toBe(2)
			expect(Constants.Precision.Default).toBe(3)

			expect(Constants.NoColors).toBe(0)
			expect(Constants.FaceColors).toBe(1)
			expect(Constants.VertexColors).toBe(2)
			expect(Constants.NoBlending).toBe(0)
			expect(Constants.NormalBlending).toBe(1)
			expect(Constants.AdditiveBlending).toBe(2)
			expect(Constants.SubtractiveBlending).toBe(3)
			expect(Constants.MultiplyBlending).toBe(4)
			expect(Constants.CustomBlending).toBe(5)
			expect(Constants.AddEquation).toBe(100)
			expect(Constants.SubtractEquation).toBe(101)
			expect(Constants.ReverseSubtractEquation).toBe(102)
			expect(Constants.MinEquation).toBe(103)
			expect(Constants.MaxEquation).toBe(104)

			expect(Constants.BlendingDstFactor.ZeroFactor).toBe(200)
			expect(Constants.BlendingDstFactor.OneFactor).toBe(201)
			expect(Constants.BlendingDstFactor.SrcColorFactor).toBe(202)
			expect(Constants.BlendingDstFactor.OneMinusSrcColorFactor).toBe(203)
			expect(Constants.BlendingDstFactor.SrcAlphaFactor).toBe(204)
			expect(Constants.BlendingDstFactor.OneMinusSrcAlphaFactor).toBe(205)
			expect(Constants.BlendingDstFactor.DstAlphaFactor).toBe(206)
			expect(Constants.BlendingDstFactor.OneMinusDstAlphaFactor).toBe(207)
			expect(Constants.BlendingDstFactor.DstColorFactor).toBe(208)
			expect(Constants.BlendingDstFactor.OneMinusDstColorFactor).toBe(209)

			expect(Constants.BlendingSrcFactor.ZeroFactor).toBe(200)
			expect(Constants.BlendingSrcFactor.OneFactor).toBe(201)
			expect(Constants.BlendingSrcFactor.SrcColorFactor).toBe(202)
			expect(Constants.BlendingSrcFactor.OneMinusSrcColorFactor).toBe(203)
			expect(Constants.BlendingSrcFactor.SrcAlphaFactor).toBe(204)
			expect(Constants.BlendingSrcFactor.OneMinusSrcAlphaFactor).toBe(205)
			expect(Constants.BlendingSrcFactor.DstAlphaFactor).toBe(206)
			expect(Constants.BlendingSrcFactor.OneMinusDstAlphaFactor).toBe(207)
			expect(Constants.BlendingSrcFactor.DstColorFactor).toBe(208)
			expect(Constants.BlendingSrcFactor.OneMinusDstColorFactor).toBe(209)
			expect(Constants.BlendingSrcFactor.SrcAlphaSaturateFactor).toBe(210)

			expect(Constants.NeverDepth).toBe(0)
			expect(Constants.AlwaysDepth).toBe(1)
			expect(Constants.LessDepth).toBe(2)
			expect(Constants.LessEqualDepth).toBe(3)
			expect(Constants.EqualDepth).toBe(4)
			expect(Constants.GreaterEqualDepth).toBe(5)
			expect(Constants.GreaterDepth).toBe(6)
			expect(Constants.NotEqualDepth).toBe(7)
			expect(Constants.MultiplyOperation).toBe(0)
			expect(Constants.MixOperation).toBe(1)
			expect(Constants.AddOperation).toBe(2)
			expect(Constants.NoToneMapping).toBe(0)
			expect(Constants.LinearToneMapping).toBe(1)
			expect(Constants.ReinhardToneMapping).toBe(2)
			expect(Constants.Uncharted2ToneMapping).toBe(3)
			expect(Constants.CineonToneMapping).toBe(4)
			expect(Constants.UVMapping).toBe(300)
			expect(Constants.CubeReflectionMapping).toBe(301)
			expect(Constants.CubeRefractionMapping).toBe(302)
			expect(Constants.EquirectangularReflectionMapping).toBe(303)
			expect(Constants.EquirectangularRefractionMapping).toBe(304)
			expect(Constants.SphericalReflectionMapping).toBe(305)
			expect(Constants.CubeUVReflectionMapping).toBe(306)
			expect(Constants.CubeUVRefractionMapping).toBe(307)
			expect(Constants.RepeatWrapping).toBe(1000)
			expect(Constants.ClampToEdgeWrapping).toBe(1001)
			expect(Constants.MirroredRepeatWrapping).toBe(1002)
			expect(Constants.NearestFilter).toBe(1003)
			expect(Constants.NearestMipMapNearestFilter).toBe(1004)
			expect(Constants.NearestMipMapLinearFilter).toBe(1005)
			expect(Constants.LinearFilter).toBe(1006)
			expect(Constants.LinearMipMapNearestFilter).toBe(1007)
			expect(Constants.LinearMipMapLinearFilter).toBe(1008)
			expect(Constants.UnsignedByteType).toBe(1009)
			expect(Constants.ByteType).toBe(1010)
			expect(Constants.ShortType).toBe(1011)
			expect(Constants.UnsignedShortType).toBe(1012)
			expect(Constants.IntType).toBe(1013)
			expect(Constants.UnsignedIntType).toBe(1014)
			expect(Constants.FloatType).toBe(1015)
			expect(Constants.HalfFloatType).toBe(1016)
			expect(Constants.UnsignedShort4444Type).toBe(1017)
			expect(Constants.UnsignedShort5551Type).toBe(1018)
			expect(Constants.UnsignedShort565Type).toBe(1019)
			expect(Constants.UnsignedInt248Type).toBe(1020)
			expect(Constants.AlphaFormat).toBe(1021)
			expect(Constants.RGBFormat).toBe(1022)
			expect(Constants.RGBAFormat).toBe(1023)
			expect(Constants.LuminanceFormat).toBe(1024)
			expect(Constants.LuminanceAlphaFormat).toBe(1025)
			expect(Constants.RGBEFormat).toBe(Constants.RGBAFormat)
			expect(Constants.DepthFormat).toBe(1026)
			expect(Constants.DepthStencilFormat).toBe(1027)
			expect(Constants.RGB_S3TC_DXT1_Format).toBe(33776)
			expect(Constants.RGBA_S3TC_DXT1_Format).toBe(33777)
			expect(Constants.RGBA_S3TC_DXT3_Format).toBe(33778)
			expect(Constants.RGBA_S3TC_DXT5_Format).toBe(33779)
			expect(Constants.RGB_PVRTC_4BPPV1_Format).toBe(35840)
			expect(Constants.RGB_PVRTC_2BPPV1_Format).toBe(35841)
			expect(Constants.RGBA_PVRTC_4BPPV1_Format).toBe(35842)
			expect(Constants.RGBA_PVRTC_2BPPV1_Format).toBe(35843)
			expect(Constants.RGB_ETC1_Format).toBe(36196)
			expect(Constants.RGBA_ASTC_4x4_Format).toBe(37808)
			expect(Constants.RGBA_ASTC_5x4_Format).toBe(37809)
			expect(Constants.RGBA_ASTC_5x5_Format).toBe(37810)
			expect(Constants.RGBA_ASTC_6x5_Format).toBe(37811)
			expect(Constants.RGBA_ASTC_6x6_Format).toBe(37812)
			expect(Constants.RGBA_ASTC_8x5_Format).toBe(37813)
			expect(Constants.RGBA_ASTC_8x6_Format).toBe(37814)
			expect(Constants.RGBA_ASTC_8x8_Format).toBe(37815)
			expect(Constants.RGBA_ASTC_10x5_Format).toBe(37816)
			expect(Constants.RGBA_ASTC_10x6_Format).toBe(37817)
			expect(Constants.RGBA_ASTC_10x8_Format).toBe(37818)
			expect(Constants.RGBA_ASTC_10x10_Format).toBe(37819)
			expect(Constants.RGBA_ASTC_12x10_Format).toBe(37820)
			expect(Constants.RGBA_ASTC_12x12_Format).toBe(37821)
			expect(Constants.LoopOnce).toBe(2200)
			expect(Constants.LoopRepeat).toBe(2201)
			expect(Constants.LoopPingPong).toBe(2202)
			expect(Constants.InterpolateDiscrete).toBe(2300)
			expect(Constants.InterpolateLinear).toBe(2301)
			expect(Constants.InterpolateSmooth).toBe(2302)
			expect(Constants.ZeroCurvatureEnding).toBe(2400)
			expect(Constants.ZeroSlopeEnding).toBe(2401)
			expect(Constants.WrapAroundEnding).toBe(2402)
			expect(Constants.TrianglesDrawMode).toBe(0)
			expect(Constants.TriangleStripDrawMode).toBe(1)
			expect(Constants.TriangleFanDrawMode).toBe(2)
			expect(Constants.LinearEncoding).toBe(3000)
			expect(Constants.sRGBEncoding).toBe(3001)
			expect(Constants.GammaEncoding).toBe(3007)
			expect(Constants.RGBEEncoding).toBe(3002)
			expect(Constants.LogLuvEncoding).toBe(3003)
			expect(Constants.RGBM7Encoding).toBe(3004)
			expect(Constants.RGBM16Encoding).toBe(3005)
			expect(Constants.RGBDEncoding).toBe(3006)
			expect(Constants.BasicDepthPacking).toBe(3200)
			expect(Constants.RGBADepthPacking).toBe(3201)
		})
	})
})
